#include "number.h"
#include <boost/regex.hpp>

bool obj::tokens::number::isToken() {
    static const boost::regex e1("^-?[0-9]*(\\.)?[0-9]*$", boost::regex::extended);
    return regex_match(getStr(), e1);
}

bool obj::tokens::number::needsMore() {
    const std::string& str = getStr();
    return (str == "-" || str[str.size() - 1] == '.');
}
